from collada import *
import json

col = Collada("Ancient Horror.dae", ignore=[DaeUnsupportedError, DaeBrokenRefError])

def inspectNodes(pNode, pSceneNode):
    pSceneNode['children'] = {}
    for cNode in pNode.children:
        cSceneNode = pSceneNode['children'][cNode.id] = {}
        cSceneNode['matrix'] = cNode.matrix
        inspectNodes(cNode, cSceneNode)

sceneNodes = {}
controllers = []

inspectNodes(col.scene.nodes[0], sceneNodes)

for controller in col.scene.objects("controller"):
	controllers.append(controller)

